package com.nsn.wy.r4h.calculate.step;

import java.util.List;
import java.util.Set;

import org.json.JSONObject;

import com.nsn.wy.r4h.calculate.ItemAlgorithmEnum;
import com.nsn.wy.r4h.calculate.data.CandidatePOJO;
import com.nsn.wy.r4h.criterion.data.CriterionItemPO;
import com.nsn.wy.r4h.criterion.data.CriterionPO;
import com.nsn.wy.r4h.criterion.data.CriterionSchemaPO;

public class JudgeStateBeforAllcoate extends AbstractCalculateStep {

	@Override
	public void process(List<CandidatePOJO> candidateList, CriterionPO criterion) {

		Set<CriterionItemPO> items = criterion.getItems();
		for (CandidatePOJO candidate : candidateList) {
			JSONObject json = candidate.getGatheredDataJson();
			Boolean validateResult = validate(json, items);

		}
	}

	private Boolean validate(JSONObject json, Set<CriterionItemPO> items) {

		for (CriterionItemPO item : items) {
			ItemAlgorithmEnum algorithm = item.getAlgorithm();
//			algorithm.CARRIER_NUM_MIN_RUL.
		}

		return Boolean.TRUE;
	}

	@Override
	public CriterionPO determinateCriterion(CriterionSchemaPO schema) {
		return schema.getOriginalCriterion();
	}

}
